<?php
	class MY_Model extends CI_Model {
		   public function __construct(){
            parent::__construct();        
        }
        public function add(){
            $query = $this->db->get("nav");
            return $query->result();
        }
        public function edit($id){
            $query = $this->db->where("id",$id)->get($this->table_name);
            return $query->row();
        }
        public function get_One($id){
            $query = $this->db->where("id",$id)->get($this->table_name);
            return $query->row();
        }
    	public function Add_save($data){
            $this->db->insert($this->table_name,$data);
        }
          public function Edit_save($id,$data){
            $this->db->where("id",$id)->update($this->table_name,$data);
        }
        public function Delete($id){
            $this->db->where("id",$id)->delete($this->table_name);
        }
	}
?>